package com.example.demo.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

@JsonSerialize(using = BootOAuthExceptionJacksonSerializer.class)
public class BootOAuth2Exception extends OAuth2Exception {

    private int status;

    public BootOAuth2Exception(String msg, Throwable t, int status) {
        super(msg, t);
        this.status = status;
    }

    public BootOAuth2Exception(String msg) {
        super(msg);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
